/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PacienteDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idPaciente;
	public final StringExpression nombrePac;
	public final StringExpression rutPac;
	public final IntegerExpression edadPac;
	public final StringExpression direccionPac;
	public final StringExpression sexo;
	public final DateExpression fechaNac;
	
	public PacienteDetachedCriteria() {
		super(orm.Paciente.class, orm.PacienteCriteria.class);
		idPaciente = new IntegerExpression("idPaciente", this.getDetachedCriteria());
		nombrePac = new StringExpression("nombrePac", this.getDetachedCriteria());
		rutPac = new StringExpression("rutPac", this.getDetachedCriteria());
		edadPac = new IntegerExpression("edadPac", this.getDetachedCriteria());
		direccionPac = new StringExpression("direccionPac", this.getDetachedCriteria());
		sexo = new StringExpression("sexo", this.getDetachedCriteria());
		fechaNac = new DateExpression("fechaNac", this.getDetachedCriteria());
	}
	
	public PacienteDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.PacienteCriteria.class);
		idPaciente = new IntegerExpression("idPaciente", this.getDetachedCriteria());
		nombrePac = new StringExpression("nombrePac", this.getDetachedCriteria());
		rutPac = new StringExpression("rutPac", this.getDetachedCriteria());
		edadPac = new IntegerExpression("edadPac", this.getDetachedCriteria());
		direccionPac = new StringExpression("direccionPac", this.getDetachedCriteria());
		sexo = new StringExpression("sexo", this.getDetachedCriteria());
		fechaNac = new DateExpression("fechaNac", this.getDetachedCriteria());
	}
	
	public EncuestaDetachedCriteria createEncuestaIdEncuestaCriteria() {
		return new EncuestaDetachedCriteria(createCriteria("ORM_EncuestaIdEncuesta"));
	}
	
	public Paciente uniquePaciente(PersistentSession session) {
		return (Paciente) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Paciente[] listPaciente(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Paciente[]) list.toArray(new Paciente[list.size()]);
	}
}

